package com.mm.controller;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.client.RestTemplate;

import java.util.HashMap;

@RestController
@RequestMapping("/boot1")
public class Boot1Controller {
    private static Logger logger = LoggerFactory.getLogger(Boot1Controller.class);
    @Autowired
    private RestTemplate restTemplate;

    @GetMapping("/trace")
    public void trace(){
        logger.info("===<call boot1-trace>===");
        restTemplate.getForEntity("http://MMSPRINGBOOT2/boot2/trace",null,new HashMap<>());
    }
}
